package uclick.messenger.server;

public class ProjectUtil {

	public static String StringConverter(String str){
		str=str.replace("&amp;", "&");
		str=str.replace("&lt;", "<");
		str=str.replace("&gt;", ">");
		str=str.replace("&quot;", "\"");
		return str;
	}
	public static String deleteTrash(String str){
		String gt = "<?";
		//int firstGt=0;
		int firstGt = -1;
		int firstX = str.indexOf("xml");
		firstGt=str.indexOf("<");
		if(firstGt==0){
			System.out.println(str);
			return str;
		}else{
			String s = "";
			s = str.substring(0, firstX);
			str = str.replace(s, gt);
			System.out.println(str);
			return str;
		}
	}
	public static void main(String[] ar){
		ProjectUtil.deleteTrash("<?xml ddddd");
	}
}
